/******************************************************************/
/*                                                                */
/*  Winpooch : Windows Watchdog                                   */
/*  Copyright (C) 2004-2005  Benoit Blanchon                      */
/*                                                                */
/*  This program is free software; you can redistribute it        */
/*  and/or modify it under the terms of the GNU General Public    */
/*  License as published by the Free Software Foundation; either  */
/*  version 2 of the License, or (at your option) any later       */
/*  version.                                                      */
/*                                                                */
/*  This program is distributed in the hope that it will be       */
/*  useful, but WITHOUT ANY WARRANTY; without even the implied    */
/*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       */
/*  PURPOSE.  See the GNU General Public License for more         */
/*  details.                                                      */
/*                                                                */
/*  You should have received a copy of the GNU General Public     */
/*  License along with this program; if not, write to the Free    */
/*  Software Foundation, Inc.,                                    */
/*  675 Mass Ave, Cambridge, MA 02139, USA.                       */
/*                                                                */
/******************************************************************/

#ifndef _SPY_INTERNALS_H
#define _SPY_INTERNALS_H

#include "Filter.h"
#include "SpyDll.h"

LPTSTR	SpyInt_AsciiToUnicode (LPCSTR szSrc) ;

DWORD	SpyInt_CatchCall (UINT nReason, LPCTSTR szFormat, ...) ;

#define SPYINT_ERROR	0xFFFFFFFF

DWORD	SpyInt_NotifyServer (SDNMHDR * pMessage, DWORD dwSize) ;

BOOL	SpyInt_CallRemoteFuncByPID (DWORD dProcessID, PROC pfnRemoteFunc, 
				 void * pData, int nDataSize, DWORD * pdwExitCode) ;

BOOL	SpyInt_CallRemoteFuncByHandle (HANDLE hProcess, PROC pfnRemoteFunc, 
				    void * pData, int nDataSize, DWORD * pdwExitCode) ;

typedef struct {
  LPVOID pBase ;
  DWORD	 nSize ;
} MEMAREA ;

BOOL	SpyInt_SuspendThread (DWORD dwThreadID,
			      MEMAREA * pForbidden, UINT nForbidden) ;

BOOL	SpyInt_ResumeThread (DWORD dwThreadID) ;

BOOL	SpyInt_SuspendOtherThreads (MEMAREA * pForbidden, UINT nForbidden) ;

BOOL	SpyInt_ResumeOtherThreads () ;

#endif
